﻿using BLL;
using Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.IO;
using Tools;
using BLL.App;
using BLL.Basis;

namespace WebProject.Controllers
{
    public class AppController : Controller
    {
        AppBLL appBLL;
        ServiceBLL serviceBLL;
        InventoryBLL inventoryBLL;
        ReturnResult rsl;
        SystemBLL sysBLL;
        TxtLogHelper txtLog;
        BLL.BarCode.ServiceBLL serBLL;
        WareHouseBLL wareBLL;
        public AppController()
        {
            appBLL = new AppBLL();
            serviceBLL = new ServiceBLL();//出入库方法
            //日志记录
            txtLog = new TxtLogHelper();
            serBLL = new BLL.BarCode.ServiceBLL();//组装方法
            wareBLL = new WareHouseBLL();
        }
        //
        // GET: /App/
        public ActionResult Index()
        {
            return View();
        }
        #region 移动端系统基础数据
        /// <summary>
        /// 获得账套号
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult get_Acount()
        {
            #region 获取账套
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            txtLog.AddLogMsg("accct");
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Message = "无法获取传递参数"; return Json(rsl);
            }
            else
            {
                rsl = appBLL.getAccount(json);
            }
            #region 加密方法
            string getdatas = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));//加密
            #endregion
            return Json(getdatas);
            #endregion
        }
        /// <summary>
        /// 修改移动端的服务器Ip地址
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult UpdateConnect()
        {
            #region 修改移动端的服务器Ip地址
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Message = "无法获取传递参数"; return Json(rsl);
            }
            else
            {
                json = Encryption.DesDecrypt(json);
              var   jsonOb = JsonConvert.DeserializeObject<JObject>(json);
              if (jsonOb.Property("serviceIP") != null)
              {
                  if (!string.IsNullOrWhiteSpace(jsonOb["serviceIP"].ToString()))
                  {
                      rsl.Result = true;
                      rsl.Message = "连接成功";
                  }
                } 
            }
            #region 加密方法
            string getdatas = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));//加密
            #endregion
            return Json(getdatas);
            #endregion
        }
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult Login()
        {
            #region 用户登录
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Message = "无法获取传递参数"; return Json(rsl);
            }
            else
            {
                rsl = appBLL.login(json);
            }
            #region 加密方法
            string getdatas = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));//加密
            #endregion
            return Json(getdatas);
            #endregion
        }
        /// <summary>
        /// 获取token
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetToken()
        {
            #region 获取token
            rsl = new ReturnResult();
            sysBLL = new SystemBLL();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Message = "无法获取传递参数"; return Json(rsl);
            }
            else
            {
                rsl = appBLL.getToken(json);

            }
            #region 加密方法
            string getdatas = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));//加密        
            #endregion
            return Json(getdatas);
            #endregion
        }
        /// <summary>
        /// 获取仓库信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetWareHouse()
        {
            #region 获取仓库信息
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);

            var json = streamReader.ReadToEnd();
            var getDatas = Encryption.DesDecrypt(json);
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getWareHouse(json);
            txtLog.AddLogMsg("GetWareHouse()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取部门信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetDepartment()
        {
            #region 获取部门信息
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getDepartment(json);
            txtLog.AddLogMsg("GetDepartment()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取存货信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetInventory()
        {
            #region 获取存货信息
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getInventory(json);
            txtLog.AddLogMsg("GetInventory()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
 
        /// 获取收发类别与出入库类型的对应关系信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetInOutRdStyle()
        {
            #region 获取收发类别
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getInOutRdStyle(json);
            txtLog.AddLogMsg("GetInOutRdStyle()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取仓库类别与出入库类型的对应关系信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetInOutWareStyle()
        {
            #region 获取仓库类别
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getInOutWareStyle(json);
            txtLog.AddLogMsg("GetInOutWareStyle()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
               /// <summary>
        /// 获取部门类别与出入库类型的对应关系信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetInOutDeptStyle()
        {
            #region 获取部门类别
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getInOutDeptStyle(json);
            txtLog.AddLogMsg("getInOutDeptStyle()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }

        /// <summary>
        /// 获取用户移动端权限信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetUserPowerList()
        {
            rsl = new ReturnResult();
            #region 获取用户移动端权限信息
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口GetUserPowerList，入参参数:" + getJson);
                rsl = appBLL.getUserPowerList(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取所有菜单
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetMenuTypeList()
        {
            rsl = new ReturnResult();
            #region 获取所有菜单
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口GetMenuTypeList，入参参数:" + getJson);
                rsl = appBLL.getMenuTypeList(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        
        
        /// <summary>
        /// 获取盘点单号信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetInventoryCode()
        {
            #region 获取盘点单号信息
            inventoryBLL = new InventoryBLL();
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = inventoryBLL.VenTaskInfo();
            txtLog.AddLogMsg("GetRdStyle()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取客户信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetCustomer()
        {
            #region 获取客户信息
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getCustomer(json);
            txtLog.AddLogMsg("GetCustomer()方法："+JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        
        /// <summary>
        /// 获取公共基础数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetCommonDataInfo()
        {
            #region 获取公共基础数据
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getCommonDataInfo(json);
            txtLog.AddLogMsg("GetCommonDataInfo()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
       
        /// <summary>
        /// 获取T+销货单
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetSaleOrderList()
        {
            #region 获取T+销货单
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getSaleOrderList(json);
            txtLog.AddLogMsg("GetSaleOrderList()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取U8发货退货单信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetDispatchList()
        {
            #region 获取U8发货退货单信息
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getDispatchList(json);
            txtLog.AddLogMsg("GetDispatchList()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取U8借出归回单信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetBorrowOutBackList()
        {
            #region 获取U8发货退货单信息
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getBorrowOutBackList(json);
            txtLog.AddLogMsg("GetBorrowOutBackList()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取U8借出借用单信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetBorrowOutList()
        {
            #region 获取U8发货退货单信息
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getBorrowOutList(json);
            txtLog.AddLogMsg("GetBorrowOutList()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        

        /// <summary>
        /// 获取U8调拨申请单
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetAllotRecordsInfo()
        {
            #region 获取U8生产计划单
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getAllotRecordsInfo(json);
            txtLog.AddLogMsg("GetAllotRecordsInfo()方法：" + JsonConvert.SerializeObject(rsl.Data));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        #endregion


        /// <summary>
        /// 获取生成的扫描编码
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetScanCode()
        {
            rsl = new ReturnResult();
            #region 获取生成的扫描编码
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getScanCode(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 绑定条码的生产计划单
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult SaveBarCodePlan()
        {
            rsl = new ReturnResult();
            #region 绑定条码的生产计划单
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.saveBarCodePlan(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 保存出入库扫描的条码数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult AddScanRecord()
        {
            rsl = new ReturnResult();
            #region 保存扫描单号
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.addScanRecord(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }

      

        /// <summary>
        /// 删除出入库某个临时编码的所有数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult DeleteScanRecord()
        {
            rsl = new ReturnResult();
            #region 删除出入库某个临时编码的所有数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.deleteScanRecord(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 保存盘点扫描数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult AddInventoryRecord()
        {
            rsl = new ReturnResult();
            inventoryBLL = new InventoryBLL();
            #region 保存扫描单号
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            json = Encryption.DesDecrypt(json);
            rsl = inventoryBLL.AddTaskRecord(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取盘点扫描数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetInventoryList()
        {
            rsl = new ReturnResult();
            inventoryBLL = new InventoryBLL();
            #region 获取盘点扫描数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            json = Encryption.DesDecrypt(json);
            rsl = inventoryBLL.getInventoryList(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 删除盘点扫描数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult DelInventoryRecord()
        {
            rsl = new ReturnResult();
            inventoryBLL = new InventoryBLL();
            #region 删除盘点扫描数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            json = Encryption.DesDecrypt(json);
            //rsl = inventoryBLL.delInventoryCode(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        ///// <summary>
        ///// 提交出入库扫描数据
        ///// </summary>
        ///// <returns></returns>
        //[HttpPost]
        //public JsonResult SubmitScanRecord()
        //{
        //    rsl = new ReturnResult();
        #region 提交出入库扫描单号
        //    Stream reqStream = Request.InputStream;
        //    StreamReader streamReader = new StreamReader(reqStream);
        //    var json = streamReader.ReadToEnd();
        //    if (string.IsNullOrWhiteSpace(json))
        //    {
        //        rsl.Result = false;
        //        rsl.Message = "无法获取传递参数";
        //        return Json(rsl);
        //    }
        //    rsl = appBLL.submitScanRecord(json);
        //    #region 加密
        //    string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
        //    #endregion
        //    return Json(getData);
        #endregion
        //}

        /// <summary>
        /// 保存调拨扫描数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult AddAllotScanRecord()
        {
            rsl = new ReturnResult();
            #region 保存扫描单号
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.addAllotScanRecord(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }

        /// <summary>
        /// 获取刚扫描数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetScanBarCode()
        {
            rsl = new ReturnResult();
            #region 获取扫描数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            json = Encryption.DesDecrypt(json);
            rsl = serviceBLL.getScanBarCode(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }


        /// <summary>
        /// 获取组装临时表中刚扫描数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetAssembelScanBarCode()
        {
            rsl = new ReturnResult();
            #region 获取扫描数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            json = Encryption.DesDecrypt(json);
            rsl = serviceBLL.getAssembelScanBarCode(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 删除扫描数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult DeleteScanBarCode()
        {
            rsl = new ReturnResult();
            #region 删除扫描数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            json = Encryption.DesDecrypt(json);
            //有重复的条码时默认是删除临时表中的该数据
            rsl = serviceBLL.DelCollectRepeat(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }

        /// <summary>
        /// 获取临时表中扫描单号
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetTempCode()
        {
            rsl = new ReturnResult();
            #region 获取临时表中扫描单号
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            //有重复的条码时默认是删除临时表中的该数据
            rsl = appBLL.getTempCode(json);
            txtLog.AddLogMsg("GetTempCode()方法："+rsl.Message);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }


    
        /// <summary>
        /// 组装母件和子件操作数据存放到临时表中
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult TempAssemblyProduct()
        {
            rsl = new ReturnResult();
            #region 组装母件和子件操作数据存放到临时表中
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口AddTempProductInfo，入参参数:" + getJson);
                //rsl = serBLL.AddTempProductInfo(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 删除临时表中的组装数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult DeleteAssemblyProduct()
        {
            rsl = new ReturnResult();
            #region 删除临时表中的组装数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口DeleteAssemblyProduct，入参参数:" + json);
                //rsl = appBLL.deleteAssemblyProduct(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 保存组装母件和子件操作
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult SaveAssemblyProduct()
        {
            rsl = new ReturnResult();
            #region 保存组装母件和子件操作
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
             else
                {
                    string getJson = Encryption.DesDecrypt(json);
                    txtLog.AddLogMsg("调用接口SaveTempProductInfo，入参参数:" + getJson);
                    //rsl = serBLL.SaveTempProductInfo(getJson);
                }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取扫描的组装条码信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetAssemblyList()
        {
            rsl = new ReturnResult();
            #region 获取组装的数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口getAssemblyList，入参参数:" + getJson);
                //rsl = serBLL.getAssemblyList(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }

        /// <summary>
        /// 保存调试操作的数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult SaveDebugProduct()
        {
            rsl = new ReturnResult();
            #region 保存调试操作的数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口SaveDebugProduct，入参参数:" + getJson);
                //rsl = serBLL.AddDebugProduct(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }

        /// <summary>
        /// 删除调试操作的数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult DeleteDebugProduct()
        {
            rsl = new ReturnResult();
            #region 删除调试操作的数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口DeleteDebugProduct，入参参数:" + getJson);
                //rsl = appBLL.deleteDebugProduct(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
      
        /// <summary>
        /// 获取调试操作的数据列表
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetDebugProductList()
        {
            rsl = new ReturnResult();
            #region 获取调试操作的数据列表
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口GetDebugProductList，入参参数:" + getJson);
                //rsl = serBLL.getDebugProductInfo(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }


        /// <summary>
        /// 保存扫描的临时单据数据（出入库）
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult SaveTmpeCode()
        {
            #region 保存临时数据
            rsl = new ReturnResult();
            sysBLL = new SystemBLL();
            serviceBLL = new ServiceBLL();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Message = "无法获取传递参数"; return Json(rsl);
            }
            else
            {
                json = Encryption.DesDecrypt(json);
                rsl = serviceBLL.MSaveTempData(json);
            }
            #region 加密方法
            string getdatas = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));//加密        
            #endregion
            return Json(getdatas);
            #endregion
        }


        /// <summary>
        /// 获取扫描的质检的条码信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetCheckProductInfo()
        {
            rsl = new ReturnResult();
            #region 获取调试操作的数据列表
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口GetCheckProductInfo，入参参数:" + getJson);
                rsl = appBLL.getCheckProductInfo(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
     
        /// <summary>
        /// 获取质检操作的存货检验项信息
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetProductCheckList()
        {
            rsl = new ReturnResult();
            #region 获取调试操作的数据列表
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口GetProductCheckList，入参参数:" + getJson);
                rsl = appBLL.getProductCheckList(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 保存质检数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult AddProductCheckInfo()
        {
            rsl = new ReturnResult();
            #region 获取调试操作的数据列表
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口AddProductCheckInfo，入参参数:" + getJson);
                rsl = appBLL.addProductCheckInfo(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
       
        /// <summary>
        /// 获取出入库单号中所有条码的数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetInputList()
        {
            rsl = new ReturnResult();
            #region 获取出入库单号中所有条码
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            //
            rsl = appBLL.getInputList(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 统计发货单明细对应的扫描相应条码的数量
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetTemScanSaleOrderList() {
            rsl = new ReturnResult();
            Stream stream = Request.InputStream;
            StreamReader streamReader = new StreamReader(stream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.getTemScanSaleOrderList(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
        }

        /// <summary>
        /// 获取出入库单号中的数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetInputData()
        {
            rsl = new ReturnResult();
            #region 获取出入库单号中的数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            //
            rsl = appBLL.getInputData(json);
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }

        /// <summary>
        ///获取app更新数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult UpdateApp()
        {
            rsl = new ReturnResult();
            #region 获取app更新数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            //
            rsl = appBLL.updateApp(json);
            txtLog.AddLogMsg("UpdateApp()方法：" + JsonConvert.SerializeObject(rsl));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }

      

        

        #region H5移动端接口
        /// <summary>
        /// 修改用户密码
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult UpdateUserPassword()
        {
            rsl = new ReturnResult();
            #region 修改用户密码
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            //
            rsl = serviceBLL.updateUserPassword(json);
            txtLog.AddLogMsg("UpdateUserPassword()方法：" + JsonConvert.SerializeObject(rsl));
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        #region 移动端获取版本号更新检测
        /// <summary>
        /// 检测系统版本是否更新
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult UpdateEditionApp() {
            rsl = new ReturnResult();
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            rsl = appBLL.updateEditionApp(json);
            return Json(rsl);
        }
        #endregion

        #region 获取基础数据
        /// <summary>
        /// 获取所有功能菜单
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetMenuList()
        {
            rsl = new ReturnResult();
            #region 获取所有菜单
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口GetMenuList，入参参数:" + getJson);
                rsl = appBLL.GetMenuList(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取系统字典表中字段数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetDictionaryInfo()
        {
            rsl = new ReturnResult();
            #region 获取系统字典表中字段数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口GetDictionaryInfo，入参参数:" + getJson);
                rsl = appBLL.getDictionaryInfo(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取系统参数表中字段数据
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetParamentersInfo()
        {
            rsl = new ReturnResult();
            #region 获取系统参数表中字段数据
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                string getJson = Encryption.DesDecrypt(json);
                txtLog.AddLogMsg("调用接口GetParamentersInfo，入参参数:" + getJson);
                rsl = appBLL.getParamentersInfo(getJson);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        
        #endregion

       
        /// <summary>
        /// 获取盘点任务信息列表
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetCheckTaskList()
        {
            rsl = new ReturnResult();
            #region 获取盘点任务信息列表
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                rsl = appBLL.getCheckTaskList(json);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 获取盘点报告信息列表
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetCheckTaskReportList()
        {
            rsl = new ReturnResult();
            #region 获取盘点报告信息列表
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                rsl = appBLL.getCheckTaskReportList(json);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
        /// <summary>
        /// 条码信息追踪
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public JsonResult TrackBarCodeInfo()
        {
            rsl = new ReturnResult();
            #region 条码信息追踪
            Stream reqStream = Request.InputStream;
            StreamReader streamReader = new StreamReader(reqStream);
            var json = streamReader.ReadToEnd();
            if (string.IsNullOrWhiteSpace(json))
            {
                rsl.Result = false;
                rsl.Message = "无法获取传递参数";
                return Json(rsl);
            }
            else
            {
                rsl = appBLL.getTrackBarCodeInfo(json);
            }
            #region 加密
            string getData = Encryption.DesEncrypt(JsonConvert.SerializeObject(rsl));
            #endregion
            return Json(getData);
            #endregion
        }
     
        #endregion
    }
}